package com.lagou.edu.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lyj
 * @Title: ConfigController
 * @ProjectName lagou-parent
 * @Description: TODO
 * @date 2021/1/2 3:29
 */

@RestController
@RequestMapping("/config")
@RefreshScope
public class ConfigController {

    @Value("${path}")
    private String path;

    /**
     * 测试是否拿到配置文件
     * @param
     * @return
     */
    @GetMapping("/viewconfig")
    public String viewconfig() {

          return path;
    }
}
